<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="ThemeBucket">
    <link rel="shortcut icon" href="#" type="image/png">

    <title>Register</title>

    <link href="/css/style.css" rel="stylesheet">
    <link href="/css/style-responsive.css" rel="stylesheet">
</head>
<script>
    function checkpassword() {
        var password = document.getElementById("password").value;
        var confirmPassword = document.getElementById("confirmPassword").value;

        if(password == confirmPassword) {
            document.getElementById("tishi").innerHTML="<br><font color='green'>两次密码输入一致</font>";
            document.getElementById("submit").disabled = false;

        }else {
            document.getElementById("tishi").innerHTML="<br><font color='red'>两次输入密码不一致!</font>";
            document.getElementById("submit").disabled = true;
        }
    }
</script>

<body class="login-body">

<div class="container">

    <form class="form-signin" th:action="@{/register}" method="post">
        <div class="form-signin-heading text-center">
            <h1 class="sign-title">新用户注册</h1>
            <img src="/images/login-logo.png" alt=""/>
        </div>


        <div class="login-wrap">
            <p>输入您要注册账户的信息</p>
            <label id="tishi"></label>
            <input type="text" autofocus="" placeholder="用户名" name="username" class="form-control">
            <input type="password" id="password" placeholder="密码" name="password" class="form-control">
            <input type="password" id="confirmPassword" placeholder="确认密码"  class="form-control" onkeyup="checkpassword()">
            <input type="text" placeholder="电话号码" name="phone" class="form-control">

            <select name="type" class="form-control">
                <option class="form-control">--请选择--</option>
                <option value="0" class="form-control">储蓄卡</option>
                <option value="1" class="form-control">信用卡</option>
            </select>
            <button type="submit" id="submit" class="btn btn-lg btn-login btn-block">
                <i class="fa fa-check"></i>
            </button>

            <div class="registration">
                已有账号，
                <a class="" th:href="@{/jumpLogin}">
                    去登录
                </a>
            </div>
        </div>
    </form>

</div>



<!-- Placed js at the end of the document so the pages load faster -->

<!-- Placed js at the end of the document so the pages load faster -->
<script src="/js/jquery-1.10.2.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/modernizr.min.js"></script>

</body>
</html>
